package com.dsr.entity;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Id;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.Date;

/**
 * (User)实体类
 *
 * @author dsr
 * @since 2020-08-27 19:28:19
 */

@Getter
@Setter
@ApiModel("(User)实体类")
public class User implements Serializable {
    private static final long serialVersionUID = -80666112935117095L;
    @Id
    private String id;

    private String avatarUrl;

    private Integer del;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" ,timezone = "GMT+8")
    private Date loginDate;

    private boolean hasVip;

    private String nickName;

    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    private String openId;

    private String iphone;

    private Integer gender;
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    private String sessionKey;

    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    @Transient
    private String code;

}